package com.demo.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * Created by lmn on 2018/4/9.
 */
@Component
public class ScheduleJobs {

    @Scheduled(fixedRate = 1000 * 2)
    public void executeSeconds(){
        System.out.println(new Date());
    }
}
